package com.css.zfzx.sjcj.modules.drill.repository;

import com.css.zfzx.sjcj.modules.drill.Entity.QhY02Entity;
import com.css.zfzx.sjcj.modules.drill.viewobjects.ExportVo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @Author zyc
 * @Date 2021/1/15 17:09
 * @Version V1.0
 */
public interface QhY02Repository extends JpaRepository<QhY02Entity, String> {

    QhY02Entity findByIdAndIsValid(String id,String isvalid);

    @Query(nativeQuery = true,value = "select drill_synthesize_code from qh_y02 where is_valid ='1'")
    List<String> getAllCode();

    @Query(nativeQuery = true,value = "select * from qh_y02 where id =:id  and is_valid =:isValid")
    List<QhY02Entity> findQhY02ById(String id, String isValid);
}
